/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package continuity.View;

import continuity.DoorElement;
import java.awt.Graphics;
/**
 *
 * @author BK
 */
public class DoorElementView implements ElementView {
    
    private DoorElement doorElement;
    
    
    public DoorElementView(DoorElement e){
        
        this.doorElement = e;
        
    }
    @Override
    public void paintView(Graphics g){
        if(doorElement.toString().contentEquals("do")) {
            g.drawImage(ViewParameters.OpenedDoor, 0, 0, null);
        } if(doorElement.toString().contentEquals("Do")) {
            g.drawImage(ViewParameters.ClosedDoor, 0, 0, null);
        }
    }
    
}